//
//  UIViewController+PureTransition.h
//  Mask
//
//  Created by Daniel on 4/22/20.
//  Copyright © 2020 Mask. All rights reserved.
//

#import <UIKit/UIKit.h>

/**
 * 实现导航控制器相互之间的转场为全屏动画，且每个控制器有独立的导航属性
 *
 * - 导入即自动生效，默认实现全屏转场
 * - 自动保存当前控制器的导航栏属性，自动恢复导航栏原有属性
 *
 * 详细参考：https://github.com/zongmumask/YRNavigationBarPure/blob/master/README_CN.md
 *         https://www.jianshu.com/p/69663941b79b
 */
@interface UIViewController (PureTransition)

/// 导航栏是否隐藏, default is NO.
@property (nonatomic, assign) BOOL yr_prefersNavigationBarHidden;
/// 控制器是否不允许 pop 右滑手势返回, default is NO 默认支持右滑返回.
@property (nonatomic, assign) BOOL yr_interactivePopDisabled;

@end


/**
 * 添加一个属性，实现右滑全屏返回
 */
@interface UINavigationController (PureTransition)

/// 是否允许全屏返回, default is NO.
@property (nonatomic, assign) BOOL yr_allowFullScreenInteractivePop;

@end

@interface UIView (PureTransition)

/// 可见的边界值，用于将导航栏与状态栏合为一体，进行截图
@property (nonatomic, assign) CGRect visibleBoundry;

- (UIImage *)snapshotImageClipsToBounds:(BOOL)clipsToBounds;

@end
